import axios from "axios";
export default {
    async getCourse({ commit }, week) {
        console.log('周'+week)
        if(week !== undefined) {
            let { data }  = await axios.get(`http://43.142.46.124:3000/api/getCourse?week=${week}`);
            commit('getCourse', data);
            console.log(data)
        }else {
           throw new Error('请求有误！')
        }
    }
}